In recent years, a system for transmitting digital video data and digital audio data of a TV program through a satellite has been being spread. In such a system, to compress a data amount, the digital video data and digital audio data are encoded by, for example, an MPEG (Moving Picture Experts Group) system and transmitted.
In an encoding apparatus by a software process, an encoding is performed synchronously with an input period of video data. The input period has been defined by various standards. For example, in the NTSC (National Television System Committee) system, it is set to 33.36 msec. The maximum processing time (encoding time) allocated to one image is restricted by the input period of the video data which has been determined by such a standard. In other words, the inputted video data has to be encoded and the process has to be finished within the input period. The video data encoded in this manner is recorded to a predetermined recording medium or the like or transmitted through a satellite.
A receiving apparatus for receiving digital data transmitted through the satellite decodes received data by the MPEG system. In case of decoding the digital video data by a software process, it is necessary to successively execute a plurality of processes which are necessary for decoding. To output in a real-time manner, it is necessary to complete all of the processes necessary for decoding within a time which is matched with a period that is required for output. For example, in case of the NTSC system, since a frame rate is equal to 30 frames/sec, one period is equal to 33.36 msec. It is, therefore, necessary to decode the digital video data of one frame within 33.36 msec.
In dependence on a situation of a stream which is inputted or a situation of a video image which is decoded, a time necessary for executing those processes fluctuates. For example, in case of a video image of the MPEG system, a time necessary for a decoding process of a variable length code changes depending on a bit rate of a bit stream. A processing time of a motion compensation also changes depending on a kind of picture coding type such as I picture, B picture, or P picture or depending on a difference of motion compensation precision such as half pel or full pel. Further, it also takes time to perform a process such as decoding or demultiplexing of the digital audio data as well as the video image. Further, a time which is consumed by the OS for managing the whole processes also fluctuates.
Therefore, in case of decoding by the software process by using a personal computer, when the decoding process cannot be performed within an output period, the process of a part of data is skipped and an output is decimated, thereby maintaining real-time performance.
As mentioned above, according to the conventional encoding apparatus, since the encoding is performed synchronously with the input period of the video data, the encoding has to be completed at the maximum precision within the input period for each image. The precision upon encoding depends on a similarity between the image before encoding and the image obtained by decoding the encoded image. The precision also depends on the processing time for encoding, encoding method, or the like.
In the case where the encoding process is changed on the time base (for example, MPEG (Moving Picture Experts Group) 2) or in the case where each image has to be encoded at the closest precision as possible (to prevent a situation such that when the precision of the encoding differs on the time base, the decoded image flickers and becomes hard to be seen), an encoding apparatus has to be designed by setting it so that there is an enough time for the encoding process in order to raise the encoding-precision.
The encoding apparatus by the software process has to perform a control of an input, an output, and the like of the video data in addition to the encoding process, and those processes have to be simultaneously performed by a built-in processor. There is, consequently, a problem such that it is difficult to calculate the longest processing time which is allocated to the encoding process due to a relation with the processes other than the encoding process. Thus, there is also a problem such that a vain time during which the processor executes no process is caused. As mentioned above, in case of allowing one processor to perform a plurality of processes, there is a problem such that the processor needs to have a high processing ability and the costs rise.
The invention is made in consideration of such a situation and it is an object of the invention to enable encoding at high precision to be performed even by a processor of a low processing ability by allowing an encoding process of one image to be executed while preferentially executing other processes.
For example, in a dedicated receiving apparatus for receiving a satellite broadcasting, even in case of decoding a reception signal by a software process, the process for decimating an output by skipping a process of a part of data in order to maintain real-time performance should not be permitted in consideration of the fact that such an apparatus is a dedicated apparatus for decoding a digital video signal which is inherently transmitted through a satellite.
In order to enable the decoding to be completed in a short time by the software process, therefore, there are problems such that a processor having a very high processing ability is necessary and the costs are high.
The invention is made in consideration of such a situation and intends to enable a decoding process to be performed at low costs by a software process by using a processor having an ordinary processing ability.